Method and apparatus for decoding mixed code

ABSTRACT

Provided are a method and apparatus for decoding a mixed code that is a combination of first and second code images. In the method, a mixed code image is obtained by receiving the original image having the mixed code image and removing noise from the original image. Next, the colors, shades, and brightnesses of pixels of the mixed code image are categorized into groups based on a predetermined threshold, the mixed code image is divided into first and second code images, and first and second information are extracted by decoding the first and second code images, respectively. The first and second code images can be effectively decoded by decoding interpretation information, construction information, error control information, and code direction information stored in the first and/or second code images.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application claims the priorities of Korean Patent Application No.10-2004-0089725, filed on Nov. 5, 2004, and Korean Patent ApplicationNo. 10-2005-0025240, filed on Mar. 26, 2005, in the Korean IntellectualProperty Office, the disclosures of which are incorporated herein intheir entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method and apparatus for decoding aphysical or electronic code image, and more particularly, to a methodand apparatus for decoding a code that is a combination of at least twocode images (hereinafter referred to as a “mixed code”).

2. Description of the Related Art

Recognizable information, such as a character, a number, and a sign, maybe expressed as an image in consideration of the security of theinformation and a space in which the information is to be displayed. Tointerpret such an image (code image) containing information, a decoderis required.

The code image may be a one-dimensional barcode such as a universalproduct code (UPC) and an European article number (EAN), and atwo-dimensional code such as a color code, a gray code, a quick response(QR) code, a PDF-417 code, and a data matrix. Information may beobtained by recognizing an image and extracting the information from theimage using watermarking designed by MarkAny and a technology ofrecognizing a logo of an image.

Since the image code conceals information and information regarding thecode is not disclosed, a user may have difficulties in using the imagecode. For instance, the user cannot predict whether the image code isavailable to a general mobile terminal or a personal digital assistant(PDA), whether the image is provided from a personal computer (PC), andwhether information is contained in the image code. Also, the amount ofdata that can be expressed using each code is limited. Thus, in general,an image code must be newly produced whenever data is updated, and it isdifficult to include information indicating whether the data is updatedinto the image code.

In general, watermarking is used to determine whether a user who desiresto use an image is an authorized user or has a copyright of the image,or provide network connection services using image information.Therefore, watermarking information is contained in an image not to bedisclosed, and is not related to information regarding the image. Evenif the watermarking information is related to the information regardingthe image, it is impossible to decode the image using the watermarkinginformation. Of course, a watermark can be embedded into a code image,but in this case, the watermark is just combined with the original codeimage to make a simple combination thereof.

The color barcode is manufactured by mapping colors to a barcodepattern. Although the number of ways to express information can beincreased through the color barcode, the color barcode is also a simplecombination of the colors and the barcode pattern.

Alternatively, an image can be recognized by a trademark, a logo, or apattern. In detail, an input image is recognized by preparing a databaseof a pattern of a specific image, and comparing the input image with aspecific image from the database to determine the similarity between theimages.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for decoding amixed code that is a combination of first and second code images.

The present invention also provides a method of effectively decoding amixed code that is a combination of first and second code images bydecoding the first code image to extract information and decoding thesecond code image based on the extracted information.

The present invention also provides a computer readable medium storing acomputer program that executes a method of decoding a mixed code that isa combination of first and second code images.

According to an aspect of the present invention, there is provided amethod of decoding a mixed code made by overlapping a first code imagewith a second code image, the method comprising receiving the originalimage which includes the mixed code; obtaining a mixed code image byremoving noise from the original image; dividing colors, shades, andbrightnesses of pixels of the mixed code image into groups using apredetermined threshold, and dividing the mixed code image into thefirst and second code images based on the groups; and decoding the firstand second code images to extract first and second information,respectively.

According to another aspect of the present invention, there is provideda method of decoding a mixed code made by overlapping a first code imagewith a second code image, the method including extracting the first andsecond code images from the mixed code according to the difference incolor and brightness between the first and second code images, such thatthe first and second code images are separated from each other;obtaining construction information for each of the first and second codeimages by decoding a data region and a control information region of thefirst code image; and obtaining second information by decoding thesecond code image according to the construction information.

According to yet another aspect of the present invention, there isprovided an apparatus for decoding a mixed code, the apparatus includingan input unit receiving the original image having a mixed code imagemade by overlapping a first code image with a second code image; a mixedcode extracting unit obtaining the mixed code image by removing noisefrom the original image; a code image separating unit dividing the mixedcode image into the first and second code images by categorizing colors,shades, and brightnesses of pixels of the mixed code image into groupsbased on a predetermined threshold; and an information extracting unitextracting first information and second information by decoding thefirst and second code images, respectively.

Accordingly, it is possible to easily decode a mixed code that is acombination of the first and second code images.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects and advantages of the present invention willbecome more apparent by describing in detail exemplary embodimentsthereof with reference to the attached drawings in which:

FIG. 1 illustrates a construction of a mixed code according to anembodiment of the present invention;

FIGS. 2, 3A, and 3B area mixed code according to embodiments of thepresent invention;

FIG. 4 illustrates a process of recognizing construction information ofa mixed code according to an embodiment of the present invention;

FIG. 5 illustrates a process of recognizing construction information ofa mixed code according to another embodiment of the present invention;

FIGS. 6 through 8 illustrates construction information of a mixed codeaccording to embodiments of the present invention;

FIG. 9 is a table illustrating the relationship between basicinformation and additional information according to an embodiment of thepresent invention;

FIG. 10 is a table illustrating regions of a mixed code according to anembodiment of the present invention;

FIG. 11 is a table illustrating various relationships between the basicinformation and the additional information according to an embodiment ofthe present invention, represented with signs;

FIG. 12 illustrates examples of a mixed code composed of a color codeimage and a QR code image according to an embodiment of the presentinvention;

FIG. 13 illustrates a process of making a mixed code by combining acolor code image and a QR code image according to an embodiment of thepresent invention;

FIGS. 14A is a flowchart illustrating a method of decoding a mixed codeaccording to an embodiment of the present invention;

FIGS. 14B and 14C are a detailed flowchart illustrating a method ofdecoding a mixed code according to an embodiment of the presentinvention;

FIG. 15 illustrates examples of binarization of a mixed code image and alimited rectangular search according to an embodiment of the presentinvention;

FIG. 16 illustrates a mixed code image with code direction andarrangement information according to embodiments of the presentinvention;

FIG. 17 is a flowchart illustrating a method of decoding a mixed codeaccording to another embodiment of the present invention; and

FIG. 18 is a block diagram of an apparatus for decoding a mixed codeaccording to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, a mixed code, a method of generating the mixed code, and amethod and apparatus for decoding the mixed code according to exemplaryembodiments of the present invention will be described in detail withreference to the accompanying drawings.

FIG. 1 illustrates the construction of a mixed code according to anembodiment of the present invention. Referring to FIG. 1, a codeexpressed with a physical image or an electronic image according to anembodiment of the present invention (hereinafter referred to as a ‘mixedcode’) is composed of a basic code image 100 and an additionalinformation image 150. The additional information image 150 overlapswith the basic code image 100.

The basic code image 100 includes a basic information region 102, acontrol information region 104 (including a construction informationregion, a interpretation information region, and a service controlregion), a code direction information region 106, and an error controlinformation region 108 (including an error verification informationregion and an error correction information region).

The additional information image 150 includes an additional informationregion 152, and may further include a control information region, a codedirection information region, and an error control region in anadditional information image region, if necessary.

Information stored in each of the basic information region 102, theadditional information region 152, the control information region 104,the code direction information region 106, and the error correctioninformation region 108, is encoded using colors, shading, a pattern, ora combination thereof. A one-dimensional barcode, such as a universalproduct code (UPC) and an EAN, and a two-dimensional barcode, such as acolor code, a gray code, a QR code, a PDF-417 code, and a data matrix,may be used to encode each region of the basic code image 100 and theadditional information image 150.

FIGS. 2, 3A, and 3B illustrate a mixed code according to embodiments ofthe present invention. Referring to FIG. 2, a mixed code includes abasic code image expressed with a color code and an additionalinformation image expressed with a QR code. The basic code imageincludes a basic information region, a control information region, anerror correction information region, and a code direction detectionregion. The additional information image includes an additionalinformation region, a control information region, an error correctioninformation region, and a code direction information region.

Each region of a mixed code will now be described in greater detail.

1. Basic Information Region

The basic information region is a predetermined part of a basic codeimage constituting the mixed code. This region contains basicinformation that is transformed into a code using colors, shading,figures, a pattern, or a combination thereof. That is, the basicinformation, which can be expressed with characters, numbers, signs,special characters, and images, is transformed into a code representedusing colors, shading, figures, a pattern, or a combination thereofaccording to a predetermined code table, and then stored in the basicinformation region. In general, a code that is easy to recognize, e.g.,a color code, is preferably used as the basic code image.

2. Additional Information Region

The additional information region is a predetermined part of anadditional information image that overlaps with the basic code image inthe mixed code. This region contains additional information that isrepresented with an image obtained using colors, shading, figures, apattern, a mark, a sign, or a combination thereof. That is, theadditional information, which can be expressed with characters, numbers,signs, special characters, images, and a logo, is transformed into acode represented using colors, shading, figures, characters, marks,symbols, or a combination thereof according to a predetermined codetable, and then stored in the additional information region.

If the additional information image is a code, the additionalinformation region is formed as a part of the additional informationimage. When there are a plurality of additional information images, someof sets thereof are used as the additional information region.

The additional information may include only a symbol, a signal, atrademark, and a character. For instance, when the additionalinformation is represented with a symbol, the additional informationimage may further include a region (control information region, etc.)that stores information regarding the type, orientation, and arrangementof the symbol, and the symbol pattern (the similarity between the symbolpattern and another pattern).

3. Control Information Region (Construction Information Region,Interpretation Information Region, and Service Control Region)

3.1 Construction Information Region

The construction information region stores information regarding theconstructions of the basic code image and the additional informationimage, and methods of decoding them. Thus, the method of decoding theadditional image can be easily determined by decoding the constructioninformation region. It is possible to add new construction informationto or cancel the stored construction information from this region, ifrequired.

Basically, the construction information preferably includes informationregarding the types of a code in the additional information image (thecolor code, the QR code, the PDF-417 code, and so on), and the otherinformation may be added to or deleted from the construction informationas it demands.

The construction information region is included in the controlinformation region(s) of the basic code image and/or the additionalinformation image. However, since a code that is easier to recognize ispreferably constructed as the basic code image, the constitutioninformation region is preferably included in the control informationregion of the basic code image.

Table 1 shows examples of information stored in the constructioninformation region of the mixed code.

TABLE 1 Number of Number of Positions of Types of Encryption Orientationof Additional Sub-basic Additional Additional Method AdditionalInformation Information Information Information Information ElementImages Images Element Images Element Images Element Images

As illustrated in Table 1, the construction information region storesinformation regarding the total number, positions, types, andorientation of additional information element images, the total numberof sub-basic information images, and methods of encrypting them.

(1) Number of additional information element images: A total number ofimages constituting a part of the additional information image thatoverlaps with the basic code image

(2) Number of sub-basic information images: A total number of sub-basicinformation images obtained by dividing the basic code image into equalparts

(3) Positions of additional information element images: The positions ofthe additional information element images are easily determined byallocating random numbers to the sub-basic information images accordingto the number of the sub-basic information images and determining thenumber allocated to a sub-basic information image located at the centerof the additional information element images.

(4) Types of additional information element images: The type of a codein each additional information element image, the center of which isdesignated in information regarding the positions of he additionalinformation element images in a sub-basic information image of the mixedcode.

Table 2 shows information regarding various types of a code in eachadditional information element image in each sub-basic informationimage.

TABLE 2 5x5 Image Color PDF Trade- Sym- Type Code QR 417 Character Signmark Photo bol Information 1 2 3 4 5 6 7 8 Value

Referring to Table 2, different information values are allocated tovarious types of codes of the additional information element images,e.g., a 5×5 color code, the QR code, the PDF417 code, a character, asign, a trademark, a photograph, and a symbol.

(5) Encryption Method: An encryption method used to encrypt eachadditional information element image. Information regarding theencryption method may further specify an to error correction level or atechnique available. For instance, the encryption method may be definedas shown in Table 3.

TABLE 3 Value Encryption Method 0 None 1 Watermark 2 Turbo Code 3Encryption Method 3

(6) Orientation of additional information element images: A direction inwhich each additional information element image is arranged in the basiccode image. An additional information element image is read as specifiedin information regarding the orientation thereof.

-   -   0: no inclination    -   1: inclination of 45 degrees    -   2: inclination of 90 degrees    -   3: inclination of 135 degrees    -   4: inclination of 180 degrees    -   5: inclination of 225 degrees    -   6: inclination of 270 degrees    -   7: inclination of 315 degrees

Examples of construction information will now be described in greaterdetail.

(1) When the construction information is indicated with‘441234222200030020’:

TABLE 4 Number of Number of Positions of Types of Orientation ofAdditional Sub-basic Additional Additional Additional InformationInformation Information Information Encryption Information ElementImages Images Element Images Element Images Method Element Images 4 4 12 3 4 2 2 2 2 0 0 0 3 0 0 2 0

Referring to Table 4, when the code in the basic code image is a colorcode made using various colors and the construction information regionis recognized from the color code, the basic code image includes fouradditional information images that overlap with one another (see thetotal number of additional information element images), the basicinformation image is divided into four equal parts (see the total numberof sub-basic information images), and the four additional informationimages are added to the centers of the equal four parts, respectively(see the positions of additional information element images). Also, thefour additional information images are QR code images according to thetypes of the additional information element images, and a thirdadditional information element image is rotated by 90 degrees but theother additional information element images are maintained at theiroriginal positions (see the arrangement of the additional informationelement images). Also, the encryption method illustrated in Table 4reveals that three QR codes are not encrypted but a fourth additionalinformation element image is encrypted using “encryption method 3”.

FIG. 4 illustrates a mixed code, and a process of recognizingconstruction information regarding the mixed code shown in Table 4.

(2) When the construction information is represented as ‘111100’ (seeTable 5)

TABLE 5 Number of Number of Positions of Types of Orientation ofAdditional Sub-basic Additional Additional Additional InformationInformation Information Information Encryption Information ElementImages Images Element Images Element Images Method Element Images 1 1 11 0 0

Referring to Table 5, when the code in the basic code image is the QRcode, a total number of additional information images is one, and theadditional information image is a 5×5 color code that is not encryptedand rotated. Also, according to the number of sub-basic informationimages and the positions of the additional information element images,the color code is almost equivalent to the QR code in size and thecentral point of the color code is identical to that of the QR code. Ifthe color code is 1/9 times smaller than the QR code and the centralpoint of the color code is identical to that of the QR code, the numberof the sub-basic information images is changed to 9 and the positions ofthe additional information element images is changed to 5. That is, thecolor code is located at the center of the QR code that is 9 timeslarger than the color code.

FIG. 5 illustrates a mixed code, and a process of recognizingconstruction information regarding the mixed code shown in Table 5.FIGS. 6 through 8 illustrate other embodiments of constructioninformation regarding a mixed code according to the present invention.

As described above, the construction information region is preferablyincluded in the basic code image so that the entire mixed code image canbe easily decoded.

3.2 Interpretation Information Region (Relationship, Information Format,and Arrangement of Information)

The interpretation information region stores interpretation informationuseful to interpret the mixed code. The interpretation informationspecifies the relationship between the basic information and theadditional information, a manner in which the basic information and theadditional information are combined, and a manner in which the basicinformation and the additional information are decoded. Theinterpretation information region is located in the basic code imageand/or the additional information image. In detail, the interpretationinformation defines the relationship between the basic information andthe additional information, the formats of the basic information and theadditional information, a manner in which the basic information and theadditional information are arranged, and further control of code.

3.2.1 Relationship (see FIG. 9)

FIG. 9 is a table illustrating the relationship between the basicinformation and the additional information. Referring to FIG. 9, therelationship between the basic information and the additionalinformation may be defined as an equal relation, a linking relation, anadditional relation, a subset relation, and an arithmetic relation.

(1) Equal Relation: Basic information=Additional information

The basic information may be identical to the additional information. Inthis case, the format of the basic information may not be identical tothat of the additional information. For instance, it is assumed that thecode of the basic code image is a color code and the code of theadditional information image is a QR code. When the result of decodingthe basic information region is “1111”, an additional information regionof a QR code image (additional information image) may also be decoded as“1111”.

(2) Combination: Basic information+Additional information

Information regarding the mixed code is made by combining the basicinformation and the additional information.

If the mixed code has information representation of “11112222”, “1111”and “2222” may be encoded as the basic information and the additionalinformation, respectively. It is possible to express various types ofinformation by making a mixed code by adding various types of additionalinformation images to the basic code image.

(3) Subset Relation: Basic information⊂Additional information or Basicinformation⊃Additional information

Information regarding the mixed code may be equivalent to one of thebasic information and the additional information. For instance, when tengoods are put in a box, a mixed code of the box is obtained by encodinginformation represented as 1000 through 1010, and the goods have codeimages corresponding to 1000 through 1010, respectively. Thus, the mixedcode for the box is decoded to obtain information regarding the goods inthe box.

(4) Binary Operation: The interpretation information specifies a binaryoperation to be performed on basic information and additionalinformation regarding the mixed code.

(5) Four Arithmetic Operations: The interpretation information specifiesfour arithmetic operations to be performed on the basic information andthe additional information of the mixed code.

3.2.2 Information Format

The interpretation information defines the formats of the basicinformation and the additional information. The same code may be decodedin different formats, using characters, numbers, signs, or images. Forinstance, the same code can be decoded into “color”, “636F6C6F72”, i.e.,hexadecimal digits, or “099111108111114”, i.e., binary digits.Accordingly, the mixed code can be decoded variously depending on theformat of the basic information, the additional information or acombination thereof.

3.2.3 Information Arrangement

The positions of pixels of basic information image and the additionalinformation image may be changed, if required. For instance, it ispossible to change an absolute or relative position of each pixel of aQR code disposed on a color code using a predetermined transformationmethod. In this case, arrangement of information defined in theinterpretation information region is decoded and the code of theadditional information image is decoded according to the result ofdecoding.

In general, changing the position of each pixel of an image isapplicable to a service that requires an additional information image tobe encrypted. For instance, it is possible to determine whether aperson's picture is identical to a passport photograph by transformingthe passport photograph into an additional information image, includingthe additional information image into a mixed code, and decoding itusing a region storing information regarding arrangement of information.When using an additional information image that is a code for anauthentication service, for example, additional information image can beprotected by changing the positions of pixels thereof. In this case, itis preferable that encryption and decryption algorithms are embeddedinto a program and the additional information image is processed afterreading the information regarding the arrangement of information fromthe mixed code. In particular, a degree of encrypting the additionalinformation image can be increased by further using an algorithm using akey value and a method thereof.

The information regarding the arrangement of information appears to besimilar to the location information and the orientation information ofthe additional information image which are included in the constructioninformation of the mixed code. However, the information regarding thearrangement of information is different from them in that it is obtainedin pixel units or units that are less than the element-image units, notin the unit of the additional information image

3.2.4 Further Control of Code

An additional information image may later be overlapped with or added tothe basic code image. For instance, when only a color code image hasbeen used, a barcode may be added to overlap with the color code toprovide further, various services. Information regarding the addedimages is stored in the additional information image.

(1) Addition: Additional information is added to information stored in abasic code. For instance, an additional information image is furtherprinted on a document printed with a basic code image for documentmanagement. Also, information regarding the address of a videopresentation file may be added to the original document. In this case, acontrol information region is added to the additional information imagewith an additional information region.

(2) Deletion: An additional information image, e.g., regarding the termof validity of the basic code image, may further be printed on a basiccode image, thereby erasing information linked to the basic code imageor preventing the information from being used.

(3) Modification: The original code information is changed by appointinga portion thereof to be changed when changing of a telephone item of abusiness card, for example.

3.3 Service Control Region

In the service control region, services that additionally use the mixedcode are appointed so as to run an application program according to away in which each service is provided or controlled and to providevarious services using the relationship between the basic informationand the additional information.

For instance, when the basic code image is used to represent theidentification (ID) of a user and the additional information image is aphotograph image of the user, they can be used in various services, suchas a business card information service, a passport authenticatingservice, a simple photo information service, and an individual web siteservice, according to information to be defined in the service controlregion.

The information in the service control region is closely related to theinterpretation information region of the mixed code. However,specifically, the interpretation information concerns an operation to beperformed to constitute and interpret information regarding the mixedcode, whereas the information in the service control region concernsoperating of an application. For instance, the information in theservice control region is used in operating a specific application,designating a user interface, or determining the address of a databaseserver.

4. Error Control Region

The error control region stores information required to determinewhether an error occurs in decoding the mixed code, and correct theerror. The error control region is preferably included in both the basiccode image and the additional information image in order to detect anerror in each image. Such a process is preferably performed on theentire mixed code. However, the inclusion of the error control regioninto the additional information image is optional, particularly, whenthe additional information image is a symbol, a mark, or a photographimage.

Various, general methods such as a parity technique or a check bitoperation may be used to determine whether an error occurs in decodingthe mixed code, and a typical error correction technique such as aReed-Solomon code may be applied to correcting the error.

5. Code Direction Information Region (Direction Detection andArrangement Region)

The code direction information region (direction detection andarrangement region) is included into one of or both the basic code imageand the additional information image. Inclusion of the code directioninformation region is preferable, since it provides a reference point ofan image and basic information required to determine a sequence in whichthe basic code image or the additional information image is decoded.

The code direction information region is constructed using a generaltechnique using a specific pattern, sign, symbol, or parity operation,so that this region can be easily detected.

For instance, the code direction information region may be constructedusing starting, ending, and interim descriptors of a barcode or aPDF-417 code; a pattern for detecting the location of a QR code or adata matrix code; a method of determining a sequence in which colorcells are arranged; a method of determining whether a mark/character islocated at its original position (a pattern matching method); or amethod of determining intersecting cells of multiple parity cells (amethod of determining a position at which a particular column intersectswith a particular row, using a parity procedure different from a parityprocedure applied to columns and rows).

In general, the code direction information region is preferably includedin the basic code image so that this region can be easily detected.Inclusion of a code direction information region into the additionalinformation image is optional. However, the inclusion of the codedirection information region enables various uses of the additionalinformation image.

In other words, it is possible to increase the amount of information tobe expressed or diversify the use of the mixed code by arranging thebasic code image and the additional information image in differentdirections. Thus, the mixed code is highly likely to be made by changingthe original direction in which one of the basic code image and theadditional information image is arranged. As noted from the constructioninformation of the mixed code, even when one of the additionalinformation image and the basic code image does not include the codedirection information region, the direction information of one image ofthe mixed code may be included in the other images of the mixed code.However, both the basic code image and the additional information imagepreferably include the code direction information region to guaranteeimage recognition. The above regions of the mixed code are specified ina table illustrated in FIG. 10.

A method of generating a mixed code according to an embodiment of thepresent invention will now be described.

1. Determination of the Information Regarding the Mixed Code

Information to be expressed using the mixed code is determined. Theinformation may be represented with a character, a number, a sign and/oran image (pattern, logo, photograph, etc.), or may be content. Also, theinformation maybe transformed into content-related information through apredetermined method.

2. Determination of the Control Information Regarding the Mixed Code

The information to be expressed using the mixed code is divided into thebasic information and the additional information. Thus, the amounts andtypes of the basic information and the additional information may varydepending on the relationship between the basic information and theadditional information. Further, the control information is required tomake the basic information and the additional information such thattheir constructions can be easily recognized.

For instance, the code types of the basic code image and the additionalinformation image, the total number of element images of the additionalinformation image, and arrangement of the additional information imagevary depending on the amounts of the basic information and theadditional information.

The control information of the mixed code is divided into theinterpretation information and the construction information. Theinterpretation information is preferably determined after determinationof the construction information, since the amount and construction ofthe information regarding the mixed code depend on he definition of theinterpretation information. Thus, after determining the controlinformation (interpretation information and construction information),the contents and constructions of the basic information and theadditional information are defined.

In general, when being encoded in the control information region of themixed code, the control information is preferably encoded in apredetermined information format, that is, using a format of numbers andcharacters. In this case, the basic code image and the additionalinformation image can easily be decoded by decoding the controlinformation region of the mixed code prior to interpreting the mixedcode and decoding the basic code image and the additional informationimage based on the result of decoding.

2.1 Determination of Interpretation Information Regarding Mixed Code

In this operation, the interpretation information required to interpretthe mixed code is set. Specifically, the interpretation informationdefines the relationship between the basic information and theadditional information; a combination of the basic information and theadditional information by performing an operation thereon, the formatsof the basic information and the additional information, and arrangementof the basic information or the additional information. Theinterpretation information mixed code is preferably included in thecontrol information region (interpretation information region). However,when the interpretation information is included in a decoding program,whether the interpretation information is to be included in the mixedcode depends on the relationship between the basic information and theadditional information.

For instance, when a mixed code includes a color code and a 21×21 cellsize QR code that are encoded into the basic code image and theadditional information image, respectively, the interpretationinformation may be determined in a program to specify that the basicinformation is identical to the additional information, that they aremade using numbers and characters, and an encryption method. In thiscase, the control information region (interpretation information region)is not included in the mixed code.

2.1.1 Determination of Relationship

When the information regarding the mixed code is divided into the basicinformation and the additional information, the relationship between thebasic information and the additional information must be set. Forinstance, if the basic information and the additional information areidentical to each other, both of them are encoded using the sameinformation, and if they are combined to form the mixed code, the mixedcode is divided into the basic information and the additionalinformation and they are separately encoded.

When each of the basic information and the additional informationincludes the other, one of them is encoded as the entire informationregarding the mixed code and the other is encoded as a part of theinformation regarding the mixed code. The basic information or theadditional information may be in an arithmetic relation if required. Inthis case, the information regarding the mixed code can be derived byperforming an operation on one of the basic information and theadditional information using the other information.

One of the basic information and the additional information may be usedas a key value or an index of the other. In this case, when one of thebasic information and the additional information is constructed as afield, data regarding a field corresponding to the other information canbe obtained using a key value of the field. Also, one of the basicinformation and the additional information may be a key value and theother information may specify a Hash function used to calculate aspecific function, particularly, a reverse function. In this case, it ispossible to create new information as the information regarding themixed code by applying the key value to the Hash function. Specifically,the key value is obtained by taking a reverse function of a value of themixed code, and a function and a key value are computed as the basicinformation and the additional information. FIG. 11 is a tableillustrating various relationships between the basic information and theadditional information using signs, according to an embodiment of thepresent invention.

2.2.2 Definition of Information Format

The formats of the basic information and the additional information maybe defined using the relationship between the basic information and theadditional information and the information regarding the mixed code. Theinformation regarding the mixed code may specify whether the format ofeach of the basic information and the additional information is acharacter format, a value format, a sign format, or an image format.

For instance, the same information can be decoded into “color”,“636F6C6F72”, i.e., hexadecimal digits, or “099111108111114”, i.e.,binary digits. Otherwise, the information may be expressed with apredetermined sign, symbol, or pattern construction informationrepresentation of a color paint icon. In particular, an image may berepresented using a series of RGB values.

In most cases, the formats of the basic information and the additionalinformation are different from each other, and thus, both the formats ofthe basic information and the additional information are preferablyspecified.

Table 6 illustrates various formats of information contained in themixed code.

TABLE 6 Decimal English Chinese Korean Japanese Type Number Mode ModeMode Mode Sign RGB Gray Pattern YUV . . . Information 1 2 3 4 5 6 7 8 90 . . . Value f_(type)(basic information format 1 + additionalinformation format 2) = T12

For instance, when the basic information is made of numbers and theadditional information is made of English characters and numbers, theinformation in the mixed code is preferably encoded in a T12(Type 1 & 2)format. The English mode shown in Table 6 supports use of both Englishcharacters and numbers.

2.1.3 Definition of Arrangement of Information

When encoding basic information and the additional information, it ispossible to change a sequence or arrangement in which they are locatedif required. As described above, when it is preferable that codeinformation does not appear directly in an image, e.g., a photographimage, or high-degree encryption of information is required, the orderof the information is changed or the information is encrypted using apredetermined transform technique. In this case, an algorithm by whichthe transformed information is recovered to its original state isrequired. Also, it is effective to set an information value (key value)that indicates a change in the sequence or arrangement of the basicinformation and the additional information.

2.1.4. Definition of Service Information

Information regarding an application to be executed based on the basicinformation or the additional information is preferably set, because themixed code is applicable as information to various types ofapplications. However, when use of the mixed code is obvious or has beenset by programming the information regarding an application may not beset.

2.2 Determination of Construction of Mixed Code

The formats and amounts of the basic information and the additionalinformation are determined the control information regarding the mixedcode. Thus, the types and constructions of the basic code image and theadditional information image that represent the basic information andthe additional information must be determined according to the controlinformation. In this case, the amount of data, the characteristics of amedium onto which the images are to be printed, a recognition method,and a service manner must be considered.

That is, when the mixed code has a large amount of information and isused to express information, the QR code, the PDF417 code, the datamatrix, or an ultra code may be used to represent as a part of an imageconstituting the mixed code. However, when the mixed code is not used toexpress information and digital content is to be imported via a network,a combination of the color code, a cyber code, and a one-dimensional(1D) barcode may be used.

If the mixed code is to be made such that information contained thereincan easily be recognized by a user, an additional information image ofthe mixed code is preferably made of characters, a trademark, a sign, amark, or a pattern.

If the mixed code is to be printed onto a color printing medium, a colorcode or a color image may be used, and if the mixed code is to beprinted onto a black-and-white color printing medium, a gray code or ablack-and-white image may be used.

Different recognition methods must be applied to a high-definitiondisplay apparatus such as a scanner and a low-definition displayapparatus such as a mobile phone camera. When using a mobile phonecamera, the color code, a two-dimensional (2D) code or barcode thatrequires a small number of cells, a simple pattern, or a small amount ofcharacters, numbers, or a trademark image may be used. Use of thehigh-definition display apparatus enables more types of images to beused and a large amount of information to be obtained through a decodingprocess.

It is preferable that a user determines the construction of the mixedcode by selecting desired ones of programmable combinations or pieces ofelement information that are determined in consideration of the amountof data, a recognition method, the characteristics of a medium, and thetype of a service and provided via a user interface. Otherwise, once theuser determines a minimum of characteristics of the mixed code, theconstruction of the mixed code may be automatically set according to aprogram. That is, for instance, when the types of the basic code and theadditional image are determined, the most desirable total number orsizes of cells (or modes) are determined according to the program.

The construction information region of the mixed code stores theconstruction information regarding the basic code. In addition, asdescribed above, the construction information region may further storeinformation regarding a total number, locations, and types, andorientations of additional information element images, a total number ofsub-basic information images, and an encryption method.

In particular, in the encryption method, the additional informationelement images are encrypted, using watermarking or other encodingtechniques, for example. It is effective to set a code, an image ofwhich is easy to detect and decode, as the basic code, and make thecontrol information to decode and make use of the additional informationimage.

3. Determination of Basic Information and Additional Information

The formats of the basic information and the additional information, andthe relationship between the basic information and the additionalinformation are set according to the control information. The basicinformation and the additional information, which are encoded to makethe mixed code, are determined according to the formats of the basicinformation and the additional information, and the control information.The basic information and the additional information may be made in acharacter format, a number format, a sign format, a symbol format, or apattern format. Each of the basic information and the additionalinformation is transformed into colors, brightness, a shade, a pattern,symbols, characters, signs, or a logo according to a predeterminedtransform table. The results of transforming the basic information andthe additional information are included into a data region of the mixedcode image (the basic information region or the additional informationregion).

4. Determination of Error Correction Region

The error correction information regarding the basic information and theadditional information is set. One or at least two of check bits, parityinformation, and error correction information may be used as the errorcorrection information.

It is preferable that the error correction information is obtained byseparately performing an operation on each of basic information and theadditional information to check an error therein, thereby reducing atime required to perform the operation. However, the error correctioninformation may be obtained by performing the operation on the entiremixed code, if required. In particular, when the information regardingthe mixed code is to include both the error correction information andthe parity information (or the check bits), the parity information ispreferably generated after generation of the error correctioninformation. This is because it is possible to first detect the locationof an error by using a parity operation, and make it possible to use apart of the result of the parity operation in detecting the location andorientation of a code, e.g., the color code.

The check bits are used to detect an error in the barcode, and theparity operation is obvious to those of ordinary skill in the art. TheReed-Solomon code operation is a representative error correctiontechnique. In the case of the QR code and the PDF417 code, each having apredetermined error correction region, the predetermined errorcorrection region may be used. If one of two pieces of information isencoded to an image or a logo, inclusion of the error correction regionis optional. In contrast, inclusion of the error correction region intothe basic code is required. Also, information regarding the degree of anerror correction rate may be made in a specific part of the errorcorrection information region or in the order of cells, together withthe error correction region.

5. Determination of Code Direction Information

After determining the information regarding the mixed code, the codedirection information region (direction detection and arrangementregion) to be included into the mixed code image must be made. Directiondetection and arrangement information stored in the code directioninformation region may be represented with a specific pattern or afigure, such as the barcode or the QR code, or by using a part of theparity information based on a fact that an operation to be performed ona specific cell is different from that to be performed on the othercells in a color code, for example.

The direction detection and arrangement information may be contained inboth the basic code image and the additional information image, but itmust be contained in the mixed code image.

6. Determination of Basic Code Image and Additional Information Image

The predetermined basic information, additional information, controlinformation, error control information, and code direction informationare divided into the basic code image and the additional informationimage so as to virtually set images. Each information is transformedinto a color, brightness, a shade, a pattern, a sign, a symbol, atrademark, or a character according to a code transform table, and isused as a constitutional element of the basic code image or theadditional information image. The arrangement and sizes of the basiccode image and the additional information image may be made based on theconstruction information of the predetermined control information, andthe basic code image and the additional information image may be madebased on information regarding encryption method.

7. Computing and Compensating for Difference in Color and BrightnessBetween Basic Code Image and Additional Information Image

To combine the set two images, the difference in color and brightnessbetween them is determined using a predetermined algorithm andapparatus. For instance, the difference in color between them isincreased for easy separation of the two images, and the difference incolor and brightness between them is reduced to conceal the additionalcode image. Based on the predetermined control information, it ispossible to increase or reduce the difference in color and brightnessbetween the images in consideration of the use of a service and theencryption method.

FIG. 12 illustrates embodiments of a mixed code that is a combination ofa color code image and a QR code image according to the presentinvention. The color code image is made using colors and shading, andthe QR code image is a black-and-white image. Thus, the color code andthe QR code may be combined by coloring the QR code based on the colorcode, such that a white part of the QR code is brighter than a blackpart thereof or the black part of the QR code is colored withoutchanging the white part (of course, the opposite is possible).

When using a pattern such as a logo or a trademark, the color andbrightness of the pattern must be determined in consideration of thoseof an image to be used with the pattern. For instance, it is notdesirable that a black pattern overlaps with the QR code, the color andbrightness of which are identical to those of the black pattern or awhite pattern overlaps with the QR code, which leads to damage to theimage.

8. Combination of Basic Code Image and Additional Information Image

The two images, the difference in color and brightness of which iscomputed, are combined. In this case, the two images are combined to beexactly mapped to each other, based on the construction information ofthe control information. The result of combining the two images may beused as a digitalized file, displayed on a display unit, or printed ontoa physical medium.

FIG. 13 is illustrates a process of generating a mixed code by combininga color code image and a QR code image according to an embodiment of thepresent invention. Referring to FIG. 14, information regarding the mixedcode is divided into basic information and additional information, andcontrol information required to transform the basic information and theadditional information to a basic code image and an additionalinformation image, respectively, is set. Next, the basic information andthe control information are encoded into colors to obtain the basic codeimage, and the additional information and the control information areencoded to a QR code to obtain the additional information image. Then,the difference in color and brightness between the basic code image andthe additional information image are determined and the basic code imageand the additional information image are combined to make the mixedcode.

FIG. 14A is a flowchart illustrating a method of decoding a mixed codeaccording to an embodiment of the present invention. Referring to FIG.14A, the original image that includes a mixed code image obtained byoverlapping a first code image with a second code image, is received(S1400). The original image is received in digital data format in ascanner, a camera, or online.

Next, the mixed code image is obtained by canceling noise in theoriginal image (S1450). More specifically, image distortion in color orbrightness, which is caused by physical ambient conditions under whichthe original image was received, is compensated for, and a binary imageis obtained by dividing the color or brightness of the compensated imageinto two colors based on a predetermined reference value.

Next, a region connected to the edge of the binary image is consideredas noise and canceled. The binary image is divided into predeterminedblock units, and a block with the greatest number of pixels is detected.Then, maximum and minimum values of the binary image in the upper,lower, left, and right directions are measured from the center of thedetected block to the outside thereof or front the outside to thecenter. Then, a limited rectangle with vertexes having measured fourlocations values is obtained, a mixed code image region is derived inthe limited rectangle, and the mixed code image is obtained bycorresponding the mixed code image region to the original image.

After obtaining the mixed code image (S1405), the color, shading, andbrightness of each pixel of the mixed code image are analyzed, and theanalyzed color shading, and brightness are grouped based on apredetermined threshold. Thereafter, a first code image and a secondcode image are separated from the mixed code image based on thenormalized color, shading, and brightness (S1410).

Next, the first and second code images are decoded to extract first andsecond information, respectively (S1415).

FIGS. 14B and 14C illustrate a method of decoding a mixed code accordingto an embodiment of the present invention. Operations of the methodillustrated in FIGS. 14B and 14C will now be described in greaterdetail.

1. Input of Image, and Analysis of and Compensation for ColorInformation (S1450 and S1452)

In operation S1450, an image with a mixed code is received from ascanner or a camera or digital data is read out from a computer. Inoperation 1452, the read image is analyzed to remove color distortionthereof, caused by use of an illuminator. Unlike an image produced by acomputer, the image input from the scanner or the camera wouldexperience color distortion caused by ambient conditions or thecharacteristics of a tool used. Color distortion occurs depending on thedegree or color of light emitted from an illuminator (a halogen lamp, anatrium lamp, an incandescent lamp, and so on), the color temperature ofan image inputting apparatus, white balancing, the resolution of aprinting apparatus, and an image model RGB or YUV.

The characteristics of a physical medium printed with the mixed code aremajor factors that cause color distortion. For instance, colordistortion may be caused due to the color of paper or a medium printedwith the mixed code (e.g., a pink newspaper), the resolution of thepaper or the medium (newspaper: 751 pi, and a general type of paper: 300dpi), or the color of or light reflected from the paper or the mediumthat is coated.

Color distortion sometimes prevents a color from being exactlyrecognized, and as a worst scenario, it causes the color to berecognized as a wrong color. For instance, a halogen lamp, which is ared-based illuminator, places emphasis on a red color value R of the RGBchannels, and thus, green may be recognized as red.

When a reproduced image of the original image appears to have a higheramount of a specific color compared to the distribution of all colors ofthe original image, the colors of the reproduced image are preferablyadjusted by performing an arithmetic operation on RGB values of eachpixel thereof. A gray world assumption (GWA) technique is arepresentative way of adjusting colors of an image. The GWA technique isbased on an assumption that the averages of the respective RGB values ofall pixels of an image, which is captured under general ambientconditions, approximate to a predetermined value, i.e., a gray, colorvalue. In general, the GWA technique is used to process a large imagethat contains various types of elements, captured under general ambientconditions. However, it is applicable to a code recognition applicationthat uses general colors and brightness, since the mixed code is likelyto be included in an image with general elements and a surplus margin.

In other words, using the GWA technique, the RGB values of each pixel ofthe original image are measured, the averages of the RGB values arecomputed, respectively, the similarity among the three mean values iscomputed, and the difference between the value of a specific channel anda predetermined threshold is compensated for.M(i)=M(i)−(E(i)−WE(G)) where i|E(i)>WE(G), iεR, G, B  (1),wherein M(i) denotes an i-channel of whole image; E(i) denotes a meanvalue of i-channel values of a whole image; E(G) denotes the mean valueof brightness values of the whole image, which is computed byM(R)+M(G)+M(B)/3; and W denotes a weight.

In Equation (1), a subtraction operation is used to compensate for acolor value, but variozus operations such as an addition operation, anexponential operation, and a log operation may be used. In addition, agamut mapping or a correlation method may be used for compensation for acolor value, in particularly, when camera characteristic information isgiven.

2. Binarization (S1454)

In operation S1454, the image input from the scanner or the camera, orthe digital image thereof is transformed into a black-and-white image.In general, a color image is transformed into a black-and-white imageusing a threshold which is a specific value in the field of imageprocessing, since the amount of computation of a black-and-white imageis less than that of a color image and the black-and-white image can bemore easily processed than the color image. The original image is storedin a separate region. For convenience, binarization has been describedas an operation in which the read image is transformed into ablack-and-white image. However, binarization may be performed such thatthe read image is transformed into other two different colors.

If necessary, several thresholds to be used when the result oftransformation is not satisfactory are set, thereby improving the resultof transformation. Otherwise, the threshold may be determined bycomputing brightness values of the whole image, computing an averagevalue or a mean value of the brightness values or analyzing a value ofbrightness distribution of image, dividing pixels into groups havingsimilar brightness values, and computing an average of the similarbrightness values of the groups.

Whether the result of transformation is satisfactory is determined insubsequent operations in which a limited rectangle of the mixed code anda code region are derived, respectively, which will later be described.P(x,y)=1, where P(x,y)<T 0, Otherwise  (2),wherein P(x,y) denotes the brightness value of pixel coordinates (x,y),and T denotes the threshold.

3. Cancellation of Noise (S1456)

In this operation, noise is canceled from a binarized image. In general,noise is canceled by using length-based filtering, masking, or therelationship between the noise and the edge of an input image and noise.

Noise, which represents unnecessary elements of an image and iscontained in a low-quality binary image in genera, is canceled in thisoperation. In the length-based filtering, noise is removed by cancelinga pixel with a specific brightness value by performing an operation onpixels to the left, right, top, and bottom of the pixel when the valueof the pixel is less than a predetermined reference value.

In the masking, noise smaller than a specific size is canceled bymasking each pixel of a block image of a specific size. Canceling noiseby using the property of an edge portion of an input image is based on afact that in general, a code image includes a quite zone (a surplusspace around a code).

In general, a code includes a white surplus space, which separates acode image from background color or the surroundings (characters,colors, or the like), to protect the code image. Therefore, cancellationof noise connected to the edge portion of the input image draws aneffect of removing only the noise from the image, since the edge portionis not associated with the code image.

Noise that is not connected to the edge of the input image arepreferably removed by using size-based filtering or length-basedfiltering. In size-based filtering and length-based filtering, the sizeand length of a pixel are preferably less than those of a minimum unitof element images constituting the mixed code. Otherwise, the mixed codeimage may be damaged.f_(noise)(O_(xy))=0, where Size(O_(xy))<D (white) 1, Otherwise(black)  (3),wherein f_(noise)( ) denotes a noise cancellation function, O_(xy)denotes an object image with coordinates (x,y), Size(O_(xy)) denotes thesize of the object image with coordinates (x,y), and D denotes athreshold size or a threshold length.

4. Derivation of Candidate Region of Code Image (S1458)

Blocking is an operation which is first performed to detect a regionincluding the mixed code from the input image. In blocking, the inputimage is divided into block units, the size of a black image selectedfrom binarized images is computed, and a block with a largest image isdetected based on the size of the black image.

In general, since a relative or absolute minimum size of the code imageto be decoded has been determined, the size of the block is adjusted tothe minimum size, and a total number of black pixels in each block iscomputed to detect a block having a largest number of black pixels. Thecenter of the block having the largest number of black pixels is verylikely to be located inside the code image. Accordingly, it is possibleto easily determine the location of the code image through blocking.

In the case where the total number of black pixels in the blocks arealmost the same, the connection between images included in the blocks isdetected to determine whether they form a whole image. If not, it ishighly probable that the input image includes a plurality of codeimages. In this case, the images in the blocks may be determined as codeimage regions and separately processed. Also, the code image is likelyto be located around the center of the input image. In this case, evenif the code image is small, it can first be processed by applying aweight to a central block if required.i=max(i|sum(P_(i)(x,y))), i=0, 1, . . . ,B−1  (4),P_(i)(x,y) denotes a pointing value (0 or 1) of an i^(th) block, and Bdenotes a maximum number of blocks.

5. Derivation of Limited Rectangle (S1450, S1462, S1464, S1486, S1488)

The limited rectangle, which is a rectangle enclosing the mixed codeimage, is derived by determining four vertexes of the limited rectangle,using the location of the mixed code that is detected using blocking,and maximum and minimum location values of an image forming the mixedcode (S1460). That is, the limited rectangle is derived by setting apoint in the mixed code image, which is detected by blocking, to acentral point and using the maximum and minimum location values of animage that includes the point. The mixed code region is derived from thelimited rectangle (S1464).

If the inside of the mixed code image is entirely colored, theconnection between the central point and the inside of the mixed codemay be determined to detect the maximum and minimum location values.Alternatively, a virtual rectangle enclosing the mixed code image may bedetected from the outside of the mixed code image to the central pointin upper, lower, left, and right directions.

In the case of the mixed code image that has a pattern shape or an openshape, when the distances between elements of the mixed code image areless than a threshold, the mixed code is considered as being included inone image and the limited rectangle is derived from the mixed codeimage.

FIG. 15 illustrates results of binarizing a mixed code image andsearching for a limited rectangle according to an embodiment of thepresent invention. FIG. 15A illustrates a mixed code image, the insideof which is completely colored, and FIGS. 15B and C illustrate mixedcode images, the insides of which are incompletely colored. FIGS. 15Athrough C are obtained by binarizing the mixed code image based on anassumption that when the distance between elements of the mixed code isless than a threshold, the elements are connected to each other.

Whether the mixed code image can be detected using the shape of thelimited rectangle in operation S1460 is determined (S1462). When thelimited rectangle distorts extremely, for example, it is a trapezoid, itis determined that an error occurs during a binarization process or anoise cancellation process. In this case, a new limited rectangle ispreferably derived again after the threshold is readjusted throughbinarization (S1488). Also, when another candidate block is detectedduring blocking, a new limited rectangle may be detected using thedetected limited rectangle.

6. Derivation of Mixed Code Region (S1464, S1466, and S1486)

In operation S1464, the mixed code image is detected from the limitedrectangle. The limited rectangle may include not only the mixed codeimage but also noise enclosing the mixed code image, and thus, the mixedcode must be exactly detected from the limited rectangle. In general,the mixed code image is detected by detecting a borderline determiningthe limits of the mixed code image, or a code sensing pattern.

If the mixed code is clogged, e.g., the color code, it is possible todetect it by extracting characteristic points of an outer portion of themixed code image or the borderline of the mixed code image.

For instance, the vertexes of the mixed code image are detected usingthe limited rectangle and points of images in the limited rectangle,which contact the limited rectangle. Also, the mixed code image can bedetected by determining whether each image is continuous while followingits outer lines from the points to separate the mixed code image fromnoises, and selecting a largest image as the mixed code image from theimages. In general, the outer line of the code image may be detectedusing an edge detecting method using an Laplacian filter or a Sobelfilter or a turtle algorithm.

However, in the case of a 2D code or a barcode that has a pattern shapeand thus is difficult to detect the overall borderline thereof, themixed code image can be derived by detecting a code sensing pattern orstarting and ending patterns, and detecting all code sending patterns.Detecting of the patterns is limited within the limited rectangle, andthus, it is possible to easily detect the mixed code image.

Like the limited rectangle, it is possible to determine whether themixed code image region is appropriately extracted from the limitedrectangle (S1466). If the extracted mixed code image distorts extremely,binarization is performed again to reset the threshold and then themixed code image is extracted again (S1488). If another candidate blockis detected during blocking, it is possible to detect the limitedrectangle again using the candidate block (S1486).

7. Analysis of Image Characteristics (S1468)

When the mixed code image is derived, it is possible to acquireinformation regarding the locations of the characteristic points orstarting and ending regions of the mixed code image, and the borderlineof the mixed code. For instance, when the derived mixed code image is arectangle, information regarding four vertexes thereof is obtained. Ifthe mixed code image is a pattern, information regarding characteristicpoints of each location detecting pattern is obtained. If the mixed codeimage is a circle or an oval, information regarding a region inside theborderline is obtained. Based on the obtained information,characteristics of images in the mixed code image are analyzed.

The characteristics of the images are analyzed mainly by measuring thedistributions of colors and brightness, using information regarding theoriginal color image corresponding to mixed code image, which isobtained through binarization. The image characteristics are analyzed toseparate a basic code image and an additional information image, whichconstitute the mixed code image, from each other, since in general, theyare combined based on the difference in color or brightness betweenthem.

In general, the basic image and the additional image are differentiatedfrom each other using colors, and not by using colors. When usingcolors, one of the two images is represented based on color information,and the other is represented using different color or shading. When notusing colors, they are differentiated from each other using thebrightness difference between them.

In general, the color information is first analyzed by collectinginformation regarding image pixels in the mixed code image. Whether themixed code image uses the color information is determined according tothe result of analysis, and the distribution of colors is computed usinga RGB channel when it is determined that the mixed code image uses thecolor information.

Whether the mixed code image uses the color information may bedetermined by computing a brightness value of each pixel and comparingthe brightness value with each of the values of RGB channels of thepixel. When the value of a specific channel is less or greater than athreshold, it is determined that the mixed code image uses a colorcorresponding to the specific channel. Otherwise, whether the mixed codeimage uses the color information may be determined by computing therelationship between RGB channels. That is, when the difference amongthe RGB channel values is greater than a threshold or a threshold rate,it is determined that the mixed code image uses the color information.If the basic code image and the additional information image aredifferentiated from each other using only brightness difference, itmeans that they are represented with an achromatic color, and thus, theRGB channel values of each pixel are similar. When it is determined thatthe basic code image and the additional information image use the colorinformation, the color distribution is analyzed to compute the type,distribution region, or characteristics of the color.

When the basic image and the additional image are differentiated fromeach other using brightness difference, it is also possible to computethe type, number, and distribution characteristics of brightnessinformation by computing the brightness distribution of pixels in themixed code image. For instance, when a lot of white pixels aredistributed throughout the mixed code image, the mixed code image isconsidered as having the mixed code, such as a 1 D barcode or a 2Dwhite-and-black code, which mainly uses a pattern, a trademark, or alogo. When the mixed code image includes a small number of white pixelsor no white pixels, the mixed code image is considered as having a code,such as a color code or a gray code, which is mainly represented as aregion type (which processes a code region using colors or shading), nota pattern type image. In this case, such image characteristicinformation is obtained to be used as basic information for laterdecoding.

8. Setting of Threshold and Grouping (S1470)

In operation 1470, reference values to be used in separating the basiccode image and the additional information image from the mixed codeimage are determined, using image information regarding the mixed codeimage which is obtained through analysis of image characteristics.

When colors are used to distinguish the basic code image from theadditional information image, the distribution of colors and therelationship between color channels are measured and the result ofmeasurement is determined as a reference value to be used in determiningcolors. For instance, when one of RGB channel values or a combinationthereof is greater than a threshold, a pixel with the RGB channel valuesis considered as having a predetermined color. Accordingly, absolutevalues, a reference ratio, or a combination of the RGB channels of eachpixel, which can be determined as reference color values, may bedetermined as reference values.

For instance, when a color model is an RGB model, it is possible to seta set of RGB values, which are to be used in determining each color, asreference values. When the color mode is a HSV(HSB) model, it ispossible to set a relative value or an angle value representation ofhue, saturation, and brightness as the reference values. For instance,when using the HSV model, a hue value of a pixel located between 60° and180° is green, that of a pixel located between 180° and 300° is blue,and that of a pixel located at one of the other angles is red. In thiscase, 60°, 180°, and 300° are used as thresholds.

$\begin{matrix}\begin{matrix}{{P(i)} = {{G\mspace{14mu}{where}\mspace{14mu}{Tg}\; 1} \leq {{HSV}\left( {p(i)} \right)} < {{Tg}\; 2}}} \\{= {{B\mspace{14mu}{where}\mspace{14mu}{Tb}\; 1} \leq {{HSV}\left( {p(i)} \right)} < {{Tb}\; 2}}} \\{{= {R\mspace{14mu}{where}\mspace{14mu}{otherwise}}},}\end{matrix} & (5)\end{matrix}$wherein Tk denotes a k^(th) color threshold.

For brightness information, thresholds must also be estimated to be usedas reference values in categorizing images mainly into white, black, andgray images. Since gray may be divided into a plurality of levels, aplurality of thresholds corresponding to the plurality of levels may bedetermined.

In general, brightness values of the mixed code image are analyzedthrough a histogram technique, and a threshold is determined by using adense area and a spare area of pixels of a specific brightness value.That is, dense areas of the pixels with the specific brightness valueare categorized into groups, and brightness values used to categorizethe groups are set as thresholds.

The basic code image and the additional information image constitutingthe mixed code image may be distinguished from each other, using acombination of a color and a color, a color and brightness, orbrightness and brightness. When using colors, it is preferable that thecolor of each pixel of the mixed code region is compared with areference color using a color threshold and the colors are divided intoseveral groups according to the connection or the threshold distancebetween the pixels. When the colors are grouped, virtual cells areobtained.

That is, although being different in shading or brightness levels,pixels whose colors are determined to be the same are adjacent to eachother, are considered as belonging to the same group. If a code isobtained by coloring a pattern and thus the distance between pixels islarge, cells are obtained by computing the distance, virtually fillingthe distance with the same color when the distance is less than athreshold, and categorizing the pixels into groups.

Similarly, it is possible to transform the mixed code image into cells,using thresholds fir the brightness information. However, in the case ofbrightness information, there are a lot of points to be considered. Oneof the points is that when used together with a color, brightness may berepresented while changing the shade of the color. For instance, when apattern type code such as the QR code is added onto the color code, eachpixel of the QR code may be represented with the color that is equal tothat of a color cell to overlap with the pixel but is darker or lighterthan the color of the color cell.

In this case, all cells of the QR code may do not have the samebrightness value. Accordingly, a threshold must be obtained by computingthe difference in brightness/shade between regions of a cell, which aredivided using a color threshold. Also, the regions of the cell must bedivided into groups according to the brightness and shade of each color,using the threshold. For instance, it is possible to extract darkerportions from each color cell region and pattern the extracted portions.

Of course, a figure, an image, a symbol, or a character can be added toa code image represented using a color or gray, the figure, the image,the symbol, or the character having the same brightness value as thecode image. In this case, it is possible to separate the figure, theimage, the symbol, or the character from the code image only byextracting a threshold for only brightness information.

9. Separation of Basic Code Image and Additional Information Image(S1472)

When the mixed code image is divided into groups using color andbrightness thresholds, image separation is performed based on thegroups, and image grouping is performed according to image elements.When using colors, it is preferable that image separation is performedusing color distortion, and then, image separation is performed usingbrightness difference.

When using colors, it is possible to extract cells or patterns that aredetermined to have the same color, using a color threshold, andcategorize the extracted cells or patterns into groups according tocolor. Similarly, when using brightness, it is possible to extractpatterns or cells using an absolute value or a relative difference andcategorize them into groups.

For image grouping, criteria and method therefor are preferablypredetermined in a program. For instance, a mixed code image using colorand brightness information is set to be grouped into images constructedaccording to color information and images constructed according tobrightness information. Then, information regarding colors determined bya color threshold may be collected and grouped to form an image, andinformation regarding relative brightness differences in the resultantcolor cell may be groped to form another image, thereby obtaining amixed code including the color code and the QR code, for example. Thatis, a white region and a black region of a color code including colorcells are mapped to a lighter color and a darker color, respectively.

Alternatively, images with lighter pixels, and images with darker pixelsmay be grouped into two images. A portion that the two images overlapeach other may be separately represented using a different brightnesslevel or a different color. For instance, when the QR code and thebarcode, which are printed with black and white in general, arecombined, they are mapped to different brightness levels.

Of course, when the QR code and the barcode have different colors, it ispossible to more easily differentiate them from each other. Forinstance, the QR code is mapped to red, the barcode is mapped to blue,and a portion the QR code and the barcode overlaps with each other ismapped to purple. If the mixed code is comprised of such the QR code andthe barcode, it is possible to more easily separate images from themixed code image.

The grouped images are divided into the basic code image and theadditional information image. Determining whether one of the groupedimages is used as the basic code image or the additional informationimage will later be described.

10. Extraction of Code Direction/Arrangement Information, and ImageSource Information (S1474)

First, code direction information must be obtained to extractinformation from the separated two images. The code directioninformation specifies an angle of rotation that is the differencebetween the original angle of the code image and an angle of the codeimage that is rotated. It is impossible to extract code informationaccording to a normal order without the angle of the code image

According to the preset invention, the code information is extractedfrom the two images separated from the mixed code image. A method ofextracting the code information is selected according to imagecharacteristics. For instance, when an image is a code image, apredetermined pattern or location information indicating the directionof the code is included in the image.

FIG. 16 illustrates a mixed code image with code direction andarrangement information according to embodiments of the presentinvention. In the case of a 1D barcode illustrated in (c) of FIG. 16, aPDF-417 code, or an ultra code, it is possible to obtain code directioninformation by detecting starting and ending patterns. In the case of a2D code, particularly, a QR code illustrated in (b) of FIG. 16, it ispossible to obtain code direction information based on a relativelocation of a detected predetermined location detecting pattern. Whenusing colors, as illustrated in (a) of FIG. 16, code direction andarrangement information may be arranged in a predetermined sequence ofcolors or represented using a combination of parity information as inthe color code or the gray code.

The directions of pixels of a mark, a trademark, a character, or aphotograph can be detected using information regarding theircharacteristic points, line types, and directions. However, since it isdifficult to compute the information beforehand and a large amount ofcomputation is required, it is preferable that a location pattern ofsuch an image is added to or this image is set as an additional imagewhen encoding the image so that direction information can be detectedusing a basic code image.

Arrangement information is information based on which a specificposition in a code image is indicated or decoding is performed. Ingeneral, the barcode or the 2D code includes specific arrangementpatterns as reference patterns to be used in decoding. The specificarrangement patterns may be a center separation pattern of the barcode,or arrangement patterns arranged on and a left outer side of a datamatrix. The color code or the gray code does not require the arrangementpatterns since a related program provides information that they aredivided into a specific number of matrices. However, arrangementinformation is required when cells are divided by a border line or aborder region is provided.

In general, code direction information is related to position detectioninformation. A direction information pattern may be included as a subsetin an arrangement pattern, or the arrangement pattern may be identicalto the direction information pattern. In the case of the color code andthe gray code made in units of regions, not patterns, a directiondetection cell can be detected using parity information regarding eachcell, and arrangement information specifies a borderline between thecells or a predetermined division ratio.

In the case of a region type code, since color information of every cellmust be obtained to detect the direction detection information, sourceinformation values of the code are computed and then the directiondetection region is detected. Thereafter, the source information valuesare rearranged according to the code direction.

The source information is obtained by extracting information from allobtained images in minimum units. The extracted information may betransformed into a number, a character, a sign, a symbol, and/or a colorvalue according to a predetermined transform table.

In the color code, a color value of each cell divided from an image isexpressed with numbers and characters, obtained according to apredetermined transform table. In a black-and-white barcode or the QRcode, black and white patterns are divided into predetermined moduleunits and represented with a series of 0's and 1's. The sizes of suchminimum units may vary according to the arrangement pattern. That is,the size of a minimum unit such as a set of cells or patterns isdetermined by the size and position of the arrangement pattern orpredetermined instructions in a program.

For instance, it is possible to determine a total number of matrix typemodules constituting the QR code by computing the sizes of locationdetection patterns and a ratio of distances between the patterns. In thecase of the color code, cell size is determined using a borderline and acode region is divided into units of cells. When not using theborderline, cell size is determined and a code region is divided inunits of cells, based on that a program instruction that a code that hasa regular tetragon shape is 5×5 and a code that has a right-angledtetragon shape is 8×5. Likewise, a sign, a trademark, a pixel, or animage, information regarding the location of which is difficult to beobtained, may be divided into module units and an operation may beperformed on each module unit.

However, it is not required to derive the source information anddirection and location information from both the two images separated,since construction information of the image whose source information anddirection and location information are not derived can be obtained usingcontrol information which is to be obtained in a subsequent process.Basically, a code image containing location and arrangement informationmay be either a basic code image or an additional information image. Ifboth the basic code image and the additional information image includethe location and arrangement information, the types of the basic codeimage and the additional information image are predetermined in aprogram, or a code image including control information is detected andone of the separated two images is determined as the basic code imageusing the detected code image.

11. Error Control of Derived Code Image (S1476 and S1478)

In operation S1476, whether each image includes an error is checked andan error, if any, is corrected based on the obtained source information.When the source information is extracted from only one of the two imagesaccording to the direction and arrangement information, this error iscorrected. If the parity operation is used, it is possible to easilydetect an image containing an error using the parity operation. If it isdetermined in operation S1478 that the mixed code does not includeinformation for error correction, the thresholds are reset in operationS1454 or S1470 and error checking and correction are performed again. Ifthe mixed code includes error correction information, the error can becorrected using the error correction information.

When the source information is extracted from both the two images, it ispossible to detect and/or correct an error from both the two imagesusing error control information. When one of the two images has anerror, operations 1470 through 1478 may be performed again on only theimage with the error. In the case of a region type code, since theparity operation is performed thereon before operations S1476 and S1478,the result of operation is considered.

12. Derivation of Control Information and Image Decoding (S1480)

In operation S1480, the obtained source information is divided intopredetermined units of regions to obtain an information region and acontrol information region. Since the code direction information, thearrangement information region, and the error control region wereobtained in the foregoing operations, the information region and thecontrol information region can be easily obtained. If the sourceinformation is obtained from only one of the two images, the controlinformation is derived to obtain the construction information of theother image and information regarding the relationship between the twoimages. The result of encoding the control information is preferablyincluded in the image region, but when the relationship between thebasic information and the additional information is set via a program,information regarding the relationship is used as the controlinformation as described in 2.1 regarding operation S1100.

(1) Derivation of Construction Information of Mixed Code

The construction of the mixed code is determined to extract the basicinformation and the additional information from the source informationon which error checking and correction is performed based on the errorcontrol information. The construction information regarding each imageis obtained based on the derived control information. If both the twoimages include the control information, it is possible to determine theconstructions of both the two images from the control information.

However, when the control information can be extracted from one of thetwo images, it is possible to determine the construction informationregarding only the other image based on the extracted controlinformation. The construction information may specify the type of thebasic code image, a total number, positions, and types of additionalinformation element images, directions of the additional informationelement images that are arranged, a total number of sub-basicinformation images, and an encryption method used.

(2) Image Decoding Based on Construction Information

Since the construction information specifies the arrangement andpositions of the additional information element images, each additionalinformation element image is divided into predetermined units based onthe construction information and decoded according to the type thereof.For decoding, each additional information element image is adjusted toits original position based on the information regarding the directionsof the additional information element images arranged, and recovered toits original state according to a predetermined algorithm using theinformation regarding the encryption method.

A key value for decoding may be set in the control information ordesignated in a decoding program. Otherwise, when a program requires akey value to determine whether a user is an authorized user, the keyvalue may be given from the user.

Next, decoding is performed on a predetermined region of each additionalinformation element image based on the information regarding the typesand positions of the additional information element images. In detail,decoding is performed by detecting an arrangement pattern, dividing eachadditional information element image into module units, extracting asource code, and extracting error correction information. A process thatis not indicated in the control information may be skipped. The shape ofdata in each information region obtained by decoding may vary dependingon the types of the additional information element images, specified inthe control information region.

For instance, when the additional information element image is a generalcode image, code information values are derived as a character, anumber, a sign, and so on. When the additional information element imageincludes a character, a mark, or a trademark, code information valuesare derived as predetermined values, such as an 8-direction chain code,a shape number, or a Fourier descriptor, through pattern matching. The8-direction chain code, the shape number, and the Fourier descriptor arerepresented with information regarding corresponding numbers,characters, signs, symbols, or marks. To obtain such information,pattern information may be obtained by additionally processing eachadditional information element image using a conventional imageprocessing technique, such as thinning, filtering, or planarizing, sothat pattern information can be easily obtained; detecting connectionpoints or characteristic points of obtained segments; and producing thepattern information based on the result of detection. Further, aluminosity value or a color value of each pixel of a photograph imagemay be represented using a brightness value or a set of RGB channelvalues.

13. Derivation of Mixed Code Information Based on InterpretationInformation (S1482)

After deriving the information regions from the two images based on theconstruction information included in the control information, the basicinformation and the additional information are extracted from thederived information regions in operation S1482. Based on the controlinformation set in the code or a program, each information region wasmade by combining the basic information and the additional informationand normalizing the result of combining.

Operation S1482 is performed using the interpretation informationincluded in the control information of the mixed code. First,information that is obtained from each information region and has yet tobe normalized is rearranged in the original state by performing inversetransform, which is one of encoding techniques, thereon based on theinformation regarding manner of information arrangement, stored in thecontrol region. Information regarding the basic information and theadditional information are represented in predetermined informationformats. The information formats may be specified in a predeterminedtransform table in a program. Thus, two pieces of information areobtained.

One of the two pieces of the information is used as the basicinformation and the other is used as the additional information. Asdescribed above, a policy that determines which one of the two pieces ofthe information will be encoded into a basic code image, must be mappedin the control information region or programmatically predetermined. Thepolicy may be specified either in the relationship information of thecontrol information or the construction information.

The two pieces of the information are checked and an operation isperformed thereon, based on the relationship information in the controlinformation, thereby producing the original mixed code information. Themixed code information is obtained as a piece of information, orseparate pieces of information if required.

For instance, when the basic information is identical to the additionalinformation, a code that can be easily or exactly recognized is derivedfrom one of them. This is the same when the basic information and theadditional information are related to each other. However, when each ofthem includes the other, both code information of a base set and codeinformation of a subset must be obtained. When the additionalinformation image is a photograph, it is derived as a visual image, andinformation regarding a basic code used together with this image isseparately provided. As described above, such information is representedusing a character, a number, a sign, a figure, an image, or a trademark.

14. Provision of Service (S1484)

The obtained mixed code information can provide a variety of servicesaccording to the control information or service information set in aprogram. For instance, if the mixed code information specifiesindividual identification and includes photograph information, it can beused to provide a service such as a passport authentication interface ora photo business card interface. Likewise, when the mixed codeinformation includes the basic information and the additionalinformation that are related to each other, it is applicable to physicaldistribution and inventory control.

FIG. 17 is a flowchart illustrating a method of decoding a mixed codeaccording to another embodiment of the present invention. Referring toFIG. 17, a first code image and a second code image are extracted fromthe mixed code based on the difference in color and brightness betweenthe first and second code images, such that the first and second codeimages are separated from each other, the mixed code image being made byoverlapping the first and second code images with each other (S1700). Amethod of extracting the first and second code images from the mixedcode has been described above with reference to FIGS. 14A and 14B.

Next, a data region and a control information region of the extractedfirst code image are decoded to obtain first information andconstruction information that specifies a manner in which the secondcode image is located on the first code image (S1710).

In detail, as explained above with reference to Table 1, theconstruction information specifies a total number of sub-regionsobtained by dividing the first code image into equal parts, a totalnumber of element images constituting the second code image, positionsof the centers of the element images on the sub-regions, the code typesof the element images, a method of encrypting each element image, and adirection in which each element image is arranged.

Next, second information is obtained by decoding the second code imagebased on the obtained construction image (S1720). The first code imagemay further include a control information region (interpretationinformation region) in which information regarding the relationshipbetween the first and second information is encoded. In this case, therelationship information is acquired by decoding the interpretationinformation region of the first code image, and information to beexpressed using the mixed code is acquired by applying the relationshipto the first and second information.

Here, as illustrated in FIG. 9, the relationship may be defined as anequal relation, a linking relation, an additional relation, a subsetrelation, and an arithmetic relation. The information to be expressedusing the mixed code is obtained from the first and second informationaccording to the relationship therebetween.

The control information region may further specify the formats andarrangement of information included in the first and second code images,and further control of code.

The first code image may further include a code direction informationregion and an error control information region. Image decoding can beeasily performed by obtaining code direction information by decoding thecode direction information region, and determining the directions of thecodes in the first and second code images based on the obtainedinformation.

When error control information is obtained by decoding the error controlinformation region of the first code image, an error in the first andsecond information is detected and corrected based on the error controlinformation. The interpretation information region, the controlinformation region, and the error control information region may beincluded in both the first and second code images.

FIG. 18 is a block diagram of an apparatus for decoding a mixed codeaccording to an embodiment of the present invention. Referring to FIG.18, the apparatus includes an input unit 1800, a mixed code extractingunit 1820, a code image separating unit 1840, and an informationextracting unit 1860.

The input unit 1800 receives the original image with a mixed code imagefrom a scanner or a camera, or in the form of an electronic documentformat, the mixed code image made by overlapping a first code image witha second code image.

The mixed code extracting unit 1820 removes noise from the originalimage to obtain the mixed code image. In detail, the mixed codeextracting unit 1820 includes a color distortion correcting unit 1822, abinary image generating unit 1824, a noise removing unit 1826, ablocking unit 1828, a limited rectangle deriving unit 1830, and an imageextracting unit 1832.

The color distortion correcting unit 1822 corrects distortion of colorand shade of the original image, caused by ambient conditions(brightness and color of light, the quality of a medium storing theoriginal image, and so on) under which the original image was received.The binary image generating unit 1824 generates a binary image bydividing the corrected color or shade of the original image into twocolors based on a predetermined reference value. It is preferable thatthe binary image be generated by transforming the corrected color orshade into black and white so as to reduce the amount of calculation.

The noise removing unit 1826 determines and removes a region contactingthe edge of the binary image. The blocking unit 1828 divides the binaryimage from which noise is removed into predetermined block units, anddetects a block with a greatest number of image pixels.

The limited rectangle deriving unit 1830 measures maximum and minimumlocation values of the binary image in the upper, lower, left, and rightdirections from the center of the detected block to the outside thereofor from the outside of the detected block to the center thereof, andderives a limited rectangle having four vertexes of the measured maximumand minimum values. The image extracting unit 1832 derives a mixed codeimage region in the limited rectangle, and extracts the mixed code imagefrom the original image based on the derived mixed code image region.

When the mixed code image is extracted using each element of the mixedcode extracting unit 1820, the code image separating unit 1840 analyzesthe color, shade, and brightness of each pixel of the mixed code image,divides the analyzed colors, shades, and brightnesses into groups, usinga predetermined threshold, and divides the mixed code image into a firstcode image and a second code image according to the grouped colors,shades, and brightnesses.

The information extracting unit 1860 decodes the first and second codeimages to obtain first and second information, respectively. Theinformation extracting unit 1860 includes a first decoder 1862, a seconddecoder 1864, an error controller 1866, and an information producingunit 1868.

One or both of the first and second code image include a data region(s)storing the first and/or second information, a control informationregion that includes construction information and interpretationinformation, a code direction information region, and an error controlinformation region. A case where only the first code image includes thecontrol information region will now be described for convenience.

The first decoder 1862 decodes the code direction information region ofthe first code image to obtain code direction information, and decodesthe data region, the control information region, and the error controlinformation region according to the code direction information to obtainthe first information, control information, and error controlinformation.

The second decoder 1864 obtains the second information by decoding thesecond code image based on the construction information included in thecontrol information obtained by the first decoder 1862.

The error controller 1866 detects and corrects an error in the first andsecond information based on the error control information obtained bythe first decoder 1862. The information producing unit 1868 producesinformation to be expressed using the mixed code by processing the firstand second information based on the interpretation information (whichspecifies the relationship between the first and second information, andthe formats and arrangement of the first and second information) thecontrol information obtained by the first decoder 1862.

The present invention can be embodied as a computer readable code in acomputer readable medium. Here, the computer readable medium may be anyrecording apparatus capable of storing data that is read by a computersystem, e.g., a read-only memory (ROM), a random access memory (RAM), acompact disc (CD)-ROM, a magnetic tape, a floppy disk, an optical datastorage device, and so on. The computer readable medium can bedistributed among computer systems that are interconnected through anetwork and the present invention may be sorted and implemented as acomputer readable code in the distributed system.

The mixed code according to the present invention may include visualinformation indicating the purpose of the mixed code, a field to whichthe mixed code is applicable, and a way of using the same, therebyenabling a user to easily recognize it. For instance, it is possible tomanufacture a cell or a pattern of an image code to include a companyname or a uniform resource locator (URL), using a mixed code that is acombination of an image code and characters. Also, it is possible tomanufacture an image code or each cell of the image code to includeinformation regarding a logo, a symbol or a sign, using a mixed codethat is a combination of an image code. Further, it is possible tomanufacture a complex mixed code that is a combination of an image code,a character, and a logo.

In addition, additional information can be provided by adding anadditional information image to the original image code. That is, it ispossible to increase the amount of data to be contained in the mixedcode by changing or adding additional information to the code.

The mixed code includes information specifying a code region, codedirection, and reference points regarding an additional informationimage, thereby easily searching for the additional information image.That is, when a range of recognition is limited to the code region, itis possible to obtain additional information regarding the shape of thecode region, e.g., the orientation and characteristic points thereof.

An error control information region of the mixed code is used to checkand correct an error in basic code information. The basic code image andthe additional information image are constructed to be decoded using akey value and an encryption method, thereby detecting whether a user isan authorized user who owns a right for a service.

Also, it is possible to make the additional information image be aphotograph image so that it can be used in a security service. Inaddition, the mixed code according to the present invention isapplicable to various fields of services such as inventory control.

While this invention has been particularly shown and described withreference to exemplary embodiments thereof, it will be understood bythose skilled in the art that various changes in form and details may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims.

What is claimed is:
 1. A method of decoding a mixed code made byoverlapping a first code image with a second code image, comprising: (a)receiving the original image which includes the mixed code; (b)obtaining a mixed code image by removing noise from the original image;(c) dividing colors, shades, and brightnesses of pixels of the mixedcode image into groups using a predetermined threshold, and dividing themixed code image into the first and second code images based on thegroups, wherein the first code image includes construction informationregarding the second image; and (d) decoding the first and second codeimages to extract first and second information, respectively, wherein(b) comprises: (b1) correcting distortion of the color and shade of theoriginal image, which is caused by physical ambient conditions; (b2)producing a binary image by dividing one of the corrected color andshade into two colors based on a predetermined reference value; and (b3)obtaining the mixed code image by removing noise from the original imagebased on the binary image, and wherein (b3) comprises: (b3-1)determining a region contacting an edge of the binary image as noise andremoving the region; (b3-2) dividing the binary image from which noiseis removed into predetermined block units and detecting a block with agreatest number of pixels from the divided blocks; (b3-3) measuringmaximum and minimum location values of the binary image in upper, lower,left, and right directions from a center of the detected block to anoutside of the detected block or from the outside to the center; (b3-4)deriving a limited rectangle having vertexes of the measured maximum andminimum location values; (b3-5) extracting a mixed code image region inthe limited rectangle; and (b3-6) deriving the mixed code image from theoriginal image based on the extracted mixed code image region.
 2. Themethod of claim 1, wherein (c) comprises: (c1) analyzing colors, shades,and brightnesses of pixels of the mixed code image; (c2) categorizingthe analyzed colors, shades, and brightnesses into groups based on apredetermined threshold; and (c3) dividing the mixed code image into thefirst and second code images based on the grouped colors, shades, andbrightnesses.
 3. A method of decoding a mixed code made by overlapping afirst code image with a second code image, comprising: (a) extractingthe first and second code images from the mixed code according to thedifference in color and brightness between the first and second codeimages, such that the first and second code images are separated fromeach other; (b) obtaining construction information for each of the firstand second code images by decoding a data region and a controlinformation region of the first code image, wherein the first code imageincludes construction information regarding the second image; and (c)obtaining second information by decoding the second code image accordingto the construction information, wherein (b) comprises: (b1) obtainingcode direction information regarding the first and second code images bydecoding a code direction information region of the first code image;and (b2) obtaining construction information regarding the second codeimage by decoding the control information region of the first code imagebased on the code direction information, and (c) comprises obtainingsecond information by decoding the second code image based on the codedirection information and the construction information.
 4. The method ofclaim 3, wherein the construction information comprises at least one of:information regarding a total number of sub regions obtained by dividingthe first code image into equal parts; information regarding a totalnumber of element images constituting the second code image; informationregarding positions of the centers of the element images in thesub-regions; information regarding code types of the element images;information regarding a method of encrypting each element image; andinformation regarding arrangement of the element images.
 5. The methodof claim 3, wherein (a) comprises dividing the mixed code image into thefirst and second code images by categorizing colors, shades, andbrightnesses of pixels of the mixed code image into groups based on apredetermined threshold.
 6. The method of claim 3, further comprising:(d) obtaining error control information by decoding an error controlinformation region of each of the first and second code images; and (e)detecting and correcting an error in the first and second informationbased on the error control information.
 7. The method of claim 3,further comprising: (f) obtaining a relationship between the firstinformation of the first code image and the second information of thesecond code image by decoding the control information region of thefirst code image; and (g) obtaining information, which is to beexpressed using the mixed code image, by applying the relationship tothe first and second information.
 8. An apparatus for decoding a mixedcode, comprising: an input unit receiving the original image having amixed code image made by overlapping a first code image with a secondcode image; a mixed code extracting unit obtaining the mixed code imageby removing noise from the original image; a code image separating unitdividing the mixed code image into the first and second code images bycategorizing colors, shades, and brightnesses of pixels of the mixedcode image into groups based on a predetermined threshold, wherein thefirst code image includes construction information regarding the secondimage; and an information extracting unit extracting first informationand second information by decoding the first and second code images,respectively, wherein the mixed code extracting unit comprises: a colordistortion correcting unit correcting distortion of color and shade ofthe original image caused by physical ambient conditions under which theoriginal image is received; a binary image generating unit producing abinary image by dividing one of the corrected color and shade of theoriginal image into two colors based on a predetermined reference value;a noise removing unit determining and removing a region contacting anedge of the binary image; a blocking unit dividing the binary image fromwhich noise is removed into predetermined block units and detecting ablock with a greatest number of pixels from the divided blocks; alimited rectangle deriving unit measuring maximum and minimum locationvalues of the binary image in upper, lower, left, and right directionsfrom the center of the detected block to an outside of the detectedblock or from the outside to the center, and deriving a limitedrectangle having vertexes of the measured maximum and minimum locationvalues; and an image extracting unit deriving a mixed code image regionin the limited rectangle and obtaining the mixed code image from theoriginal image based on the derived mixed code image region.
 9. Theapparatus of claim 8, wherein the code image separating unit analyzescolors, shades, and brightnesses of pixels of the mixed code image,categorizing the colors, shades, and brightnesses into groups based on apredetermined threshold, and dividing the mixed code image into thefirst and second code images based on the grouped colors, shades, andbrightnesses.
 10. The apparatus of claim 8, wherein the informationextracting unit comprises: a first decoder decoding a data region and acontrol information region of the first code image to obtainconstruction information regarding each of the first and secondinformation; and a second decoder obtaining second information bydecoding the second code image based on the construction information.11. The apparatus of claim 10, wherein the construction informationcomprises at least one of: information regarding a total number of subregions obtained by dividing the first code image into equal parts;information regarding a total number of element images constituting thesecond code image; information regarding positions of the centers of theelement images in the sub-regions; information regarding code types ofthe element images; information regarding a method of encrypting eachelement image; and information regarding arrangement of the elementimages.
 12. The apparatus of claim 10, wherein the first decoder obtainserror control information by decoding an error control informationregion of each of the first and second code images, the apparatusfurther comprising an error controller detecting and correcting an errorin the first and second information based on the error controlinformation.
 13. The apparatus of claim 10, wherein the first decoderobtains information regarding a relationship between the firstinformation of the first code image and the second information of thesecond code image by decoding the control information region of thefirst code image, and the second decoder obtaining information, which isto be expressed using the mixed code, by applying the relationship tothe first and second information.
 14. An apparatus for decoding a mixedcode, comprising: an input unit receiving the original image having amixed code image made by overlapping a first code image with a secondcode image; a mixed code extracting unit obtaining the mixed code imageby removing noise from the original image; a code image separating unitdividing the mixed code image into the first and second code images bycategorizing colors, shades, and brightnesses of pixels of the mixedcode image into groups based on a predetermined threshold; aninformation extracting unit extracting first information and secondinformation by decoding the first and second code images, respectively;wherein the information extracting unit comprises: a first decoderdecoding a data region and a control information region of the firstcode image to obtain construction information regarding each of thefirst and second information; and a second decoder obtaining secondinformation by decoding the second code image based on the constructioninformation, wherein the first decoder obtains code directioninformation regarding the first and second code images by decoding acode direction information region of the first code image, andconstruction information regarding the second code image by decoding thecontrol information region of the first code image based on the codedirection information, and the second decoder obtains second informationby decoding the second code image based on the code directioninformation and the construction information.
 15. A method of decoding amixed code made by overlapping a first code image with a second codeimage, comprising: (a) receiving the original image which includes themixed code; (b) obtaining a mixed code image by removing noise from theoriginal image; and (c) dividing colors, shades, and brightnesses ofpixels of the mixed code image into groups using a predeterminedthreshold, and dividing the mixed code image into the first and secondcode images based on the groups, wherein the first code image includesconstruction information regarding the second image; wherein (b)comprises: (b1) correcting distortion of the color and shade of theoriginal image, which is caused by physical ambient conditions; (b2)producing a binary image by dividing one of the corrected color andshade into two colors based on a predetermined reference value; and (b3)obtaining the mixed code image by removing noise from the original imagebased on the binary image, and wherein (b3) comprises: (b3-1)determining a region contacting an edge of the binary image as noise andremoving the region; (b3-2) dividing the binary image from which noiseis removed into predetermined block units and detecting a block with agreatest number of pixels from the divided blocks; (b3-3) measuringmaximum and minimum location values of the binary image in upper, lower,left, and right directions from a center of the detected block to anoutside of the detected block or from the outside to the center; (b3-4)deriving a limited rectangle having vertexes of the measured maximum andminimum location values; (b3-5) extracting a mixed code image region inthe limited rectangle; and (b3-6) deriving the mixed code image from theoriginal image based on the extracted mixed code image region.